//
// Created by Asus on 2025/6/1.
//

#include <iostream>
#include <bits/ostream.tcc>
using namespace std;

template<class NameType, class AgeType>
class Person {
public:
    NameType mName;
    AgeType mAge;
    Person(NameType name, AgeType age) {
        this->mName = name;
        this->mAge = age;
    }
    void showPerson() {
        cout << "mName: " << mName << "mAge:" << mAge << endl;
    }
};

void demo01() {
    // 指定NameType 为string类型，AgeType 为 int类型
    Person<string, int>P1("孙悟空", 999);
    Person<string, int>P2 = Person<string, int>("孙悟空", 999);
    P1.showPerson();
}

int main(int argc, char *argv[]) {
    demo01();
    return 0;
}
